package com.itany.corejava.day17;

public class Consumer extends Thread {

    private Store s;

    public Consumer(String name, Store s) {
        super(name);
        this.s = s;
    }

    @Override
    public void run() {
        while(true){
            s.removeData();
            try {
                Thread.sleep(600);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
